package com.xjtu.platform.user.student.consultRecord;


import com.xjtu.platform.common.Result;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

@RestController
@RequestMapping("/student/studentConsultRecord")
public class StudentConsultRecordAPI {

    @Resource
    private StudentConsultRecordService studentConsultRecordService;

    @PostMapping("/getConsultRecord")
    public Result getStudentConsultRecord(@RequestBody StudentConsultRecordDto studentConsultRecordDto) {
        try {
            Map<String,Object> page = studentConsultRecordService.getConsultRecord(studentConsultRecordDto);
            return Result.success(page);
        } catch (Exception e) {
            e.printStackTrace();
            return Result.fail(Result.ERR_CODE_SYS,"系统错误........");
        }
    }
}
